<layout name="Common/layout"/>
<include file="Common/nav"/>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script><script type="text/javascript" src="__PUBLIC__/js/action.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/mzp-packed-me.js"></script>
<script type="text/javascript">
    function $id(element) {
        return document.getElementById(element);
    }
    //切屏--是按钮，_v是内容平台，_h是内容库
    function reg(str){
        var bt=$id(str+"_b").getElementsByTagName("h2");
        for(var i=0;i<bt.length;i++){
            bt[i].subj=str;
            bt[i].pai=i;
            bt[i].style.cursor="pointer";
            bt[i].onclick=function(){
                $id(this.subj+"_v").innerHTML=$id(this.subj+"_h").getElementsByTagName("blockquote")[this.pai].innerHTML;
                for(var j=0;j<$id(this.subj+"_b").getElementsByTagName("h2").length;j++){
                    var _bt=$id(this.subj+"_b").getElementsByTagName("h2")[j];
                    var ison=j==this.pai;
                    _bt.className=(ison?"":"h2bg");
                }
            }
        }
        $id(str+"_h").className="none";
        $id(str+"_v").innerHTML=$id(str+"_h").getElementsByTagName("blockquote")[0].innerHTML;
    }
</script>
<div class="block"  style=" position:relative">
    <div class="block box">
        <div class="blank"></div>
        <div id="ur_here">
            当前位置: <a href=".">首页</a> <code>&gt;</code> <a href="category.php?id=132">钻石</a> <code>&gt;</code> 爱冕－白18K金钻石戒指
        </div>
    </div>
    <div class="blank"></div>
    <div class="block clearfix">

        <div class="AreaL">

            <div id="category_tree">
                <div class="tit">商品分类</div>
                <?php foreach($catData as $k => $v): ?>
                <dl>
                    <dt><a href="<?php echo U('Search/cat_search?cat_id='.$v['id'],'',false); ?>"><?php echo $v['cat_name']; ?></a></dt>
                    <?php foreach($v['children'] as $k1 => $v1): ?>
                    <dt><a href="<?php echo U('Search/cat_search?cat_id='.$v1['id'],'',false); ?>"><?php echo $v1['cat_name']; ?></a></dt>
                    <dd>
                        <?php foreach($v1['children'] as $k2 => $v2): ?>
                        <a href="<?php echo U('Search/cat_search?cat_id='.$v2['id'],'',false); ?>"><?php echo $v2['cat_name']; ?></a>
                        <?php endforeach; ?>
                    </dd>
                    <?php endforeach; ?>
                </dl>
                <?php endforeach; ?>
            </div>
            <div class="blank"></div>

            <div class="box" id='history_div'>
                <h3><span>浏览历史</span></h3>
                <div class="box_1">

                    <div class="boxCenterList clearfix" id='history_list'>
                    </div>
                </div>
            </div>
            <div class="blank5"></div>
            <script type="text/javascript">
                if (document.getElementById('history_list').innerHTML.replace(/\s/g,'').length<1)
                {
                    document.getElementById('history_div').style.display='none';
                }
                else
                {
                    document.getElementById('history_div').style.display='block';
                }
                function clear_history()
                {
                    Ajax.call('user.php', 'act=clear_history',clear_history_Response, 'GET', 'TEXT',1,1);
                }
                function clear_history_Response(res)
                {
                    document.getElementById('history_list').innerHTML = '您已清空最近浏览过的商品';
                }
            </script>  </div>


        <div class="AreaR">

            <div id="goodsInfo" class="clearfix">


                <div class="imgInfo">
                    <a href="images/201601/goods_img/134_P_1454032795049.jpg" id="zoom1" class="MagicZoom MagicThumb" title="爱冕－白18K金钻石戒指">
                        <img src="images/201601/goods_img/134_G_1454032795393.jpg" alt="爱冕－白18K金钻石戒指" width="250px;" height="327px"/>
                    </a>
                    <div class="blank5"></div>
                    <div style="text-align:center; position:relative; width:100%;">
                        <a href="goods.php?id=136"><img style="position: absolute; left:0;" alt="prev" src="themes/ecmoban_shishang71/images/up.gif" /></a>
                        <a href="javascript:;" onclick="window.open('gallery.php?id=134'); return false;"><img alt="zoom" src="themes/ecmoban_shishang71/images/zoom.gif" /></a>
                    </div>


                    <div class="blank5"></div>

                    <div class="picture" id="imglist">



                        <a  href="images/201601/goods_img/134_P_1454032795049.jpg"
                            rel="zoom1"
                            rev="images/201601/goods_img/134_P_1454032795049.jpg"
                            title="">
                            <img src="images/201601/thumb_img/134_thumb_P_1454032795927.jpg" alt="爱冕－白18K金钻石戒指" class="onbg" /></a>

                    </div>

                    <script type="text/javascript">
                        mypicBg();
                    </script>


                </div>

                <div class="textInfo">
                    <form action="javascript:addToCart(134)" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
                        <div class="clearfix" style="font-size:14px; font-weight:bold; padding-bottom:8px;">
                            爱冕－白18K金钻石戒指
                        </div>
                        <ul>
                            <li class="padd">
                                本商品正在进行            <a href="group_buy.php" title="团购活动" style="font-weight:100; color:#006bcd; text-decoration:none;">[团购活动]</a>
                                <a href="group_buy.php?act=view&amp;id=18" title="团购活动 韩味HW-2014初冬套装 毛衣外套 长袖连衣裙 蓬蓬裙 气质长袖针织衫+半身裙 两件套连衣裙套装的时间为2014-10-21到2024-10-25，赶快来抢吧！" style="font-weight:100; color:#006bcd;">韩味HW-2014初冬套装 毛衣外套 长袖连衣裙 蓬蓬裙 气质长袖针织衫+半身裙 两件套连衣裙套装</a><br />
                            </li>

                            <li class="clearfix">
                                <dd>

                                    <strong>商品货号：</strong>ECS000000
                                </dd>
                            </li>
                            <li class="clearfix">
                                <dd>

                                    <strong>商品库存：</strong>
                                    97
                                </dd>
                            </li>
                            <li class="clearfix">
                                <dd>

                                    <strong>商品品牌：</strong><a href="brand.php?id=11" >  恒基伟业</a>

                                </dd>
                            </li>
                            <li class="clearfix">
                                <dd>

                                    <strong>商品重量：</strong>0克
                                </dd>
                            </li>

                            <li class="clearfix">
                                <dd>

                                    <strong>上架时间：</strong>2013-10-02
                                </dd>
                            </li>
                            <li class="clearfix">
                                <dd>

                                    <strong>商品点击数：</strong>633       </dd>
                            </li>
                            <li class="clearfix">
                                <dd>
                                    <strong>市场价格：</strong><font class="market">￥8416元</font><br />

                                    <strong>本店售价：</strong><font class="shop" id="ECS_SHOPPRICE">￥7013元</font><br />
                                    <strong>注册用户：</strong><font class="shop" id="ECS_RANKPRICE_1">￥7013元</font><br />
                                    <strong>vip：</strong><font class="shop" id="ECS_RANKPRICE_2">￥6662元</font><br />
                                </dd>
                            </li>
                            <li class="clearfix">
                                <dd>
                                    <strong>用户评价：</strong>
                                    <img src="themes/ecmoban_shishang71/images/stars5.gif" alt="comment rank 5" />
                                </dd>
                            </li>

                            <script type="text/javascript" src="js/lefttime.js"></script>      <li class="padd loop" style="margin-bottom:5px; border-bottom:1px dashed #ccc;">
                            <strong>促销价：</strong><font class="shop">￥1100元</font><br />
                            <strong>剩余时间：</strong>
                            <font class="f4" id="leftTime">请稍等, 正在载入中...</font><br />
                        </li>
                            <li class="clearfix">
                                <dd>
                                    <strong>商品总价：</strong><font id="ECS_GOODS_AMOUNT" class="shop"></font>
                                </dd>
                            </li>
                            <li class="clearfix">
                                <dd>
                                    <strong>购买数量：</strong>
                                    <input name="number" type="text" id="number" value="1" size="4" onblur="changePrice()" style="border:1px solid #ccc; "/>
                                </dd>
                            </li>


                            <li class="clearfix">
                                <dd>
                                    <strong>购买此商品可使用：</strong><font class="f4">7000 积分</font>
                                </dd>
                            </li>



                            <li class="padd">
                                <a href="javascript:addToCart(134)"><img src="themes/ecmoban_shishang71/images/goumai2.gif" /></a>
                                <a href="javascript:collect(134)"><img src="themes/ecmoban_shishang71/images/shoucang2.gif" /></a>
                                <a href="user.php?act=affiliate&goodsid=134" ><img src="themes/ecmoban_shishang71/images/tuijian.gif" /></a>
                            </li>

                        </ul>
                    </form>
                </div>
            </div>
            <div class="blank"></div>


            <div class="box">
                <div class="box_1">
                    <h3 style="padding:0 5px;">
                        <div id="com_b" class="history clearfix">
                            <h2>商品描述：</h2>
                            <h2 class="h2bg">商品属性</h2>
                        </div>
                    </h3>
                    <div id="com_v" class="boxCenterList RelaArticle"></div>
                    <div id="com_h">
                        <blockquote>
                            <p>&nbsp;</p>
                            <table id="Table_01" width="900" height="5648" border="0" cellpadding="0" cellspacing="0" style="color: rgb(0, 0, 0); font-size: 12px; font-family: Arial, 宋体;">
                                <tbody>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imu.zbird.cn/291/50/29150_1" width="900" height="594" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imu.zbird.cn/291/50/29150_4" width="900" height="959" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imp.zbird.cn/291/51/29151_1" width="900" height="599" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imp.zbird.cn/291/51/29151_4" width="900" height="702" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imu.zbird.cn/291/52/29152_1" width="900" height="1061" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imu.zbird.cn/291/52/29152_4" width="900" height="601" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imp.zbird.cn/291/53/29153_1" width="900" height="508" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color: rgb(51, 51, 51); font-size: 12px; font-family: Arial, 宋体;"><img src="http://imp.zbird.cn/291/53/29153_4" width="900" height="624" alt="" style="padding: 0px; margin: 0px; border: 0px;" /></td>
                                </tr>
                                </tbody>
                            </table>       </blockquote>
                        <blockquote>
                            <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#dddddd">
                            </table>
                        </blockquote>

                    </div>
                </div>
            </div>
            <script type="text/javascript">
                <!--
                reg("com");
                //-->
            </script>
            <div class="blank"></div>


            <div class="box">
                <div class="box_1">
                    <h3><span class="text">商品标签</span></h3>
                    <div class="boxCenterList clearfix ie6">
                        <form name="tagForm" action="javascript:;" onSubmit="return submitTag(this)" id="tagForm">
                            <p id="ECS_TAGS" style="margin-bottom:5px;">
                            </p>
                            <p>
                                <input type="text" name="tag" id="tag" class="inputBg" size="35" />
                                <input type="submit" value="添 加" class="bnt_blue" style="border:none;" />
                                <input type="hidden" name="goods_id" value="134"  />
                            </p>
                            <script type="text/javascript">
                                //<![CDATA[

                                /**
                                 * 用户添加标记的处理函数
                                 */
                                function submitTag(frm)
                                {
                                    try
                                    {
                                        var tag = frm.elements['tag'].value;
                                        var idx = frm.elements['goods_id'].value;
                                        if (tag.length > 0 && parseInt(idx) > 0)
                                        {
                                            Ajax.call('user.php?act=add_tag', "id=" + idx + "&tag=" + tag, submitTagResponse, "POST", "JSON");
                                        }
                                    }
                                    catch (e) {alert(e);}
                                    return false;
                                }
                                function submitTagResponse(result)
                                {
                                    var div = document.getElementById('ECS_TAGS');
                                    if (result.error > 0)
                                    {
                                        alert(result.message);
                                    }
                                    else
                                    {
                                        try
                                        {
                                            div.innerHTML = '';
                                            var tags = result.content;
                                            for (i = 0; i < tags.length; i++)
                                            {
                                                div.innerHTML += '<a href="search.php?keywords='+tags[i].word+'" style="color:#006ace; text-decoration:none; margin-right:5px;">' +tags[i].word + '[' + tags[i].count + ']<\/a>&nbsp;&nbsp; ';
                                            }
                                        }
                                        catch (e) {alert(e);}
                                    }
                                }

                                //]]>
                            </script>
                        </form>
                    </div>
                </div>
            </div>
            <div class="blank5"></div>
            <div id="ECS_BOUGHT"><div class="box">
                <div class="box_1">
                    <h3><span class="text">购买记录</span>(近期成交数量<font class="f1">0</font>)</h3>
                    <div class="boxCenterList">
                        还没有人购买过此商品
                        <div id="buy_pagebar" class="f_r" style="margin-top:10px">
                            <form name="selectPageForm" action="/ecshop/goods.php" method="get">
                                <div id="buy_pager">
                                    总计 0 个记录，共 1 页。 <span> <a href="javascript:gotoBuyPage(1,134)">第一页</a> <a href="javascript:;">上一页</a> <a href="javascript:;">下一页</a> <a href="javascript:;">最末页</a> </span>
                                </div>
                            </form>
                            <script type="Text/Javascript" language="JavaScript">
                                <!--

                                function selectPage(sel)
                                {
                                    sel.form.submit();
                                }

                                //-->
                            </script>
                        </div>

                        <div class="blank5"></div>
                    </div>
                </div>
            </div>
                <div class="blank5"></div></div><div id="ECS_COMMENT"> <div class="box">
            <div class="box_1">
                <h3><span class="text">用户评论</span>(共<font class="f1">0</font>条评论)</h3>
                <div class="boxCenterList clearfix" style="height:1%;">
                    <ul class="comments">
                        <li>暂时还没有任何用户评论</li>
                    </ul>

                    <div id="pagebar" class="f_r">
                        <form name="selectPageForm" action="/ecshop/goods.php" method="get">
                            <div id="pager">
                                总计 0 个记录，共 1 页。 <span> <a href="javascript:gotoPage(1,134,0)">第一页</a> <a href="javascript:;">上一页</a> <a href="javascript:;">下一页</a> <a href="javascript:;">最末页</a> </span>
                            </div>
                        </form>
                        <script type="Text/Javascript" language="JavaScript">
                            <!--

                            function selectPage(sel)
                            {
                                sel.form.submit();
                            }

                            //-->
                        </script>
                    </div>

                    <div class="blank5"></div>

                    <div class="commentsList">
                        <form action="javascript:;" onsubmit="submitComment(this)" method="post" name="commentForm" id="commentForm">
                            <table width="710" border="0" cellspacing="5" cellpadding="0">
                                <tr>
                                    <td width="64" align="right">用户名：</td>
                                    <td width="631">匿名用户</td>
                                </tr>
                                <tr>
                                    <td align="right">E-mail：</td>
                                    <td>
                                        <input type="text" name="email" id="email"  maxlength="100" value="" class="inputBorder"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">评价等级：</td>
                                    <td>
                                        <input name="comment_rank" type="radio" value="1" id="comment_rank1" /> <img src="themes/ecmoban_shishang71/images/stars1.gif" />
                                        <input name="comment_rank" type="radio" value="2" id="comment_rank2" /> <img src="themes/ecmoban_shishang71/images/stars2.gif" />
                                        <input name="comment_rank" type="radio" value="3" id="comment_rank3" /> <img src="themes/ecmoban_shishang71/images/stars3.gif" />
                                        <input name="comment_rank" type="radio" value="4" id="comment_rank4" /> <img src="themes/ecmoban_shishang71/images/stars4.gif" />
                                        <input name="comment_rank" type="radio" value="5" checked="checked" id="comment_rank5" /> <img src="themes/ecmoban_shishang71/images/stars5.gif" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" valign="top">评论内容：</td>
                                    <td>
                                        <textarea name="content" class="inputBorder" style="height:50px; width:620px;"></textarea>
                                        <input type="hidden" name="cmt_type" value="0" />
                                        <input type="hidden" name="id" value="134" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <div style="padding-left:15px; text-align:left; float:left;">
                                            验证码：<input type="text" name="captcha"  class="inputBorder" style="width:50px; margin-left:5px;"/>
                                            <img src="captcha.php?1999236088" alt="captcha" onClick="this.src='captcha.php?'+Math.random()" class="captcha">
                                        </div>
                                        <input name="" type="submit"  value="评论咨询" class="f_r bnt_blue_1" style=" margin-right:8px;">
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>

                </div>
            </div>
        </div>
            <div class="blank5"></div>

            <script type="text/javascript">
                //<![CDATA[
                var cmt_empty_username = "请输入您的用户名称";
                var cmt_empty_email = "请输入您的电子邮件地址";
                var cmt_error_email = "电子邮件地址格式不正确";
                var cmt_empty_content = "您没有输入评论的内容";
                var captcha_not_null = "验证码不能为空!";
                var cmt_invalid_comments = "无效的评论内容!";

                /**
                 * 提交评论信息
                 */
                function submitComment(frm)
                {
                    var cmt = new Object;

                    //cmt.username        = frm.elements['username'].value;
                    cmt.email           = frm.elements['email'].value;
                    cmt.content         = frm.elements['content'].value;
                    cmt.type            = frm.elements['cmt_type'].value;
                    cmt.id              = frm.elements['id'].value;
                    cmt.enabled_captcha = frm.elements['enabled_captcha'] ? frm.elements['enabled_captcha'].value : '0';
                    cmt.captcha         = frm.elements['captcha'] ? frm.elements['captcha'].value : '';
                    cmt.rank            = 0;

                    for (i = 0; i < frm.elements['comment_rank'].length; i++)
                    {
                        if (frm.elements['comment_rank'][i].checked)
                        {
                            cmt.rank = frm.elements['comment_rank'][i].value;
                        }
                    }

//  if (cmt.username.length == 0)
//  {
//     alert(cmt_empty_username);
//     return false;
//  }

                    if (cmt.email.length > 0)
                    {
                        if (!(Utils.isEmail(cmt.email)))
                        {
                            alert(cmt_error_email);
                            return false;
                        }
                    }
                    else
                    {
                        alert(cmt_empty_email);
                        return false;
                    }

                    if (cmt.content.length == 0)
                    {
                        alert(cmt_empty_content);
                        return false;
                    }

                    if (cmt.enabled_captcha > 0 && cmt.captcha.length == 0 )
                    {
                        alert(captcha_not_null);
                        return false;
                    }

                    Ajax.call('comment.php', 'cmt=' + cmt.toJSONString(), commentResponse, 'POST', 'JSON');
                    return false;
                }

                /**
                 * 处理提交评论的反馈信息
                 */
                function commentResponse(result)
                {
                    if (result.message)
                    {
                        alert(result.message);
                    }

                    if (result.error == 0)
                    {
                        var layer = document.getElementById('ECS_COMMENT');

                        if (layer)
                        {
                            layer.innerHTML = result.content;
                        }
                    }
                }

                //]]>
            </script></div>
        </div>

    </div>
</div>
<script type="text/javascript">
    var goods_id = 134;
    var goodsattr_style = 1;
    var gmt_end_time = 1948608000;
    var day = "天";
    var hour = "小时";
    var minute = "分钟";
    var second = "秒";
    var end = "结束";
    var goodsId = 134;
    var now_time = 1490335218;
    onload = function(){
        changePrice();
        fixpng();
        try {onload_leftTime();}
        catch (e) {}
    }
    /**
     * 点选可选属性或改变数量时修改商品价格的函数
     */
    function changePrice()
    {
        var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
        var qty = document.forms['ECS_FORMBUY'].elements['number'].value;
        Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty, changePriceResponse, 'GET', 'JSON');
    }
    /**
     * 接收返回的信息
     */
    function changePriceResponse(res)
    {
        if (res.err_msg.length > 0)
        {
            alert(res.err_msg);
        }
        else
        {
            document.forms['ECS_FORMBUY'].elements['number'].value = res.qty;
            if (document.getElementById('ECS_GOODS_AMOUNT'))
                document.getElementById('ECS_GOODS_AMOUNT').innerHTML = res.result;
        }
    }
</script>

